<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="../metro/css/metro-all.css?ver=@@b-version" rel="stylesheet">

    <title>Test Donut - Metro 4 :: Popular HTML, CSS and JS library</title>

</head>
<body class="m4-cloak">
<div class="container">
    <h1>Donut test page</h1>

    <div class="example">
        <div class="row">
            <div class="cell-md-3 border bd-dark">
                <div
                        class="mx-auto"
                        id="donut1"
                        data-role="donut"
                        data-value="100"
                        data-show-value="true"
                        data-cap="%"
                        data-size="100%"
                        data-on-draw-value="onDrawValue"
                        data-font-size="16"
                ></div>
            </div>
        </div>
    </div>

</div>

<script src="../metro/js/metro.js?ver=@@b-version"></script>
<script>
    $(function(){
        setInterval(function(){
            var i, d;
            for (i = 0; i < 1; i++) {
                d = $.random(0,100);
                Metro.getPlugin('#donut'+(i+1), 'donut').val(d);
            }
        }, 2000);
    });

    function onDrawValue(v){
        return v + "#"
    }
</script>
</body>
</html>
